<cfset BASE = CreateObject("component", "cfc.base") / >
<cfset statusQueries = CreateObject("component", "cfc.statusQueries") />
<cfset baseQueries = CreateObject("component", "cfc.queries") />

<cfoutput>
<!---HTML header, css links, js links, and page title--->
#BASE.htmlHeader(
    "", <!---JS links--->
    "", <!---CSS links--->
    "Access Control Creation Report", <!---Page Title--->
    "Status" <!---Active Nav Link--->
)#
<!---HTML header, css links, js links, and page title--->
</cfoutput>


<cfif Session.bolAuth EQ True and (Session.strAuthType EQ Session.IT or Session.strAuthType EQ Session.HR or Session.strAuthType EQ Session.FACILITIES)>   

    <cfset qryGetStep5bWaiting = statusQueries.funcGetSCFStepWaiting(7) />
    
    <style type="text/css" media="print">
	page {
	  size:landscape;
	}
	</style>    
    <!--- <body onload="window.print();"> --->    
	
	
	<div class="post">
	    <div class="entry">
	    	<div clase="report">
	    		<h1 class="title">Access Control Creation Report</h1>
                            
	<cfoutput>	
        <cfset intX = 1>
        <cfset GAP = 25>
        <cfif qryGetStep5bWaiting.recordcount GT 0>
        
            <script language="javascript">
                window.print();
            </script>
            
            <table width = 100%>
                <tr>
                    <td>&nbsp;</td> 
                </tr>
                <tr>
                    <td width =15%>&nbsp;</td> 
                    <td valign="bottom"><u>##</u></td> 
                    <td width=#GAP#>&nbsp;</td> 
                    <td nowrap="nowrap" valign="bottom">
                        <strong><u>Name, Job Title, &amp; Department</u></strong>
                    </td>
                    <td width=#GAP#>&nbsp;</td> 
                    <td valign="bottom" nowrap="nowrap">
                        <strong><u>Badge ID</u></strong>
                    </td>
                    <td width=#GAP#>&nbsp;</td> 
                    <td valign="bottom">
                        <strong><u>Access Level(s) Requested</u></strong>
                    </td>
                    <td width =15%>&nbsp;</td>
                </tr>
                <cfloop query="qryGetStep5bWaiting">  
                    <cfset intStepID = ID>                             
                    <cfset strEmpName =  Name>
                    <cfset qryGetEmpInfo = baseQueries.funcGetEmpInfo( intStepID ) />
      
                    <cfset intEmpID = qryGetEmpInfo.ID>
                    <cfset intBadgeID = qryGetEmpInfo.BadgeID>
                    <cfset strAccessLevelIDs = qryGetEmpInfo.BadgeAccessLevelID>
                    
                    <cfset qryGetPositionInfo = baseQueries.funcGetPositionInfo( qryGetEmpInfo.PositionID ) />

                    <cfset strJobTitle = qryGetPositionInfo.PositionCodeDescription>                                
                    
                    <cfset qryGetDept = baseQueries.funcGetDepts( qryGetEmpInfo.DeptID ) />

                    <cfset strDept = qryGetDept.OrganizationDescription>
                    
                    <cfset qryGetAccess = baseQueries.funcGetAccess( strAccessLevelIDs ) />
                                                                                
                <tr>
                    <td>&nbsp;</td> 
                    <td valign="top">#intX#)</td> 
                    <td>&nbsp;</td>  
                    <td nowrap="nowrap" valign="top">
                        #strEmpName#<BR />
                        #strJobTitle#<BR />
                        #strDept#<BR />
                    </td>
                    <td>&nbsp;</td> 
                    <td valign="top">
                        #intBadgeID#
                    </td> 
                    <td>&nbsp;</td> 
                    <td nowrap="nowrap" valign="top">
                        <cfif qryGetAccess.recordcount GT 0>
                            <cfloop query="qryGetAccess">
                                #Descript#<BR />
                            </cfloop>
                        <cfelse>
                            None
                        </cfif>
                    </td> 
                </tr>
                <tr>
                    <td>&nbsp;</td> 
                </tr>
                    <cfset intX += 1>
                </cfloop>
                
            </table>
        <cfelse>
            <span class="error">At the present time, there are not any employees staged for entry to Access Control.</span>
        </cfif>
        
    </cfoutput>
    
  			</div>
  		</div>
  	</div>
    

    
<cfelse>
	<cfinclude template="Denied.cfm">    
</cfif>

<cfoutput>
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
#BASE.htmlFooter()#
<!---HTML footer, closes html and body tags.  Any footer info goes here--->
</cfoutput>


